From 6b3416a2d748d8cdede075bea259fe609aeadc5b Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Tue, 16 Oct 2012 13:02:55 -0400 Subject: [PATCH] reftests: fix the linear-gradient reftest Don't use a repeating linear gradient, since it can't be easily reftested against a non-repeating one for the reasons described in the test header. Instead, add a separate test for repeating gradients (against another repeating gradient). This makes the test pass, so it can be added to the Makefile now. --- tests/reftests/Makefile.am | 3 +++ tests/reftests/linear-gradient.css | 11 ++++++++++- tests/reftests/linear-gradient.ref.ui | 17 +++++++++++++++++ tests/reftests/linear-gradient.ui | 17 +++++++++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am index 15ba7ebe0f..b0e7dfbf9e 100644 --- a/tests/reftests/Makefile.am +++ b/tests/reftests/Makefile.am @@ -186,6 +186,9 @@ EXTRA_DIST += \ label-small-ellipsized.ui \ label-wrap-justify.ref.ui \ label-wrap-justify.ui \ + linear-gradient.css \ + linear-gradient.ref.ui \ + linear-gradient.ui \ messagedialog-secondarytext.ui \ messagedialog-secondarytext.ref.ui \ misc-alignment.css \ diff --git a/tests/reftests/linear-gradient.css b/tests/reftests/linear-gradient.css index d6ed0d0d1b..5ec7fb94ff 100644 --- a/tests/reftests/linear-gradient.css +++ b/tests/reftests/linear-gradient.css @@ -6,6 +6,7 @@ * This means that you cannot: * ... add extra color stops, even if they'd be invisible * ... mirror the gradient (ie 'to left, red, green' vs 'to right, green, red') + * ... test a repeating gradient against a non repeating one * and probably a bunch of other things. * These things can cause off-by-one rounding errors in pixman (and probably * your GPU, too) and that'd trigger test failures. @@ -27,9 +28,17 @@ } #c { - background-image: repeating-linear-gradient(3.5turn, red, green 10px, red 20px); + background-image: linear-gradient(3.5turn, red, green 10px, red 20px, green 30px, red 40px); } #reference #c { background-image: linear-gradient(to bottom, red, green 10px, red 20px, green 30px, red 40px); } + +#d { + background-image: repeating-linear-gradient(180deg, red, green 10px, red 20px); +} + +#reference #d { + background-image: repeating-linear-gradient(to bottom, red, green 10px, red 20px); +} diff --git a/tests/reftests/linear-gradient.ref.ui b/tests/reftests/linear-gradient.ref.ui index e7f5a6084c..ec77ed2b68 100644 --- a/tests/reftests/linear-gradient.ref.ui +++ b/tests/reftests/linear-gradient.ref.ui @@ -61,6 +61,23 @@ 2 + + + False + 40 + 30 + True + True + True + False + d + + + False + True + 3 + + diff --git a/tests/reftests/linear-gradient.ui b/tests/reftests/linear-gradient.ui index adbfbe22e8..7da0ad8c4c 100644 --- a/tests/reftests/linear-gradient.ui +++ b/tests/reftests/linear-gradient.ui @@ -60,6 +60,23 @@ 2 + + + False + 40 + 30 + True + True + True + False + d + + + False + True + 3 + + -- 2.30.2